package com.jk.provider.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.jms.Queue;

@RestController
public class TestController {
    @Autowired
    private Queue queue;
    @Autowired
    private JmsMessagingTemplate JmsMessagingTemplate;
    @RequestMapping("test")
    public void test(String name){
        JmsMessagingTemplate.convertAndSend(queue,name);

    }
}
